package com.zto.sch.service.impl;

import com.zto.sch.entity.Order;
import com.zto.sch.mapper.OrderMapper;
import com.zto.sch.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: sch-diy-parent
 * @description:
 * @author: sch
 * @create: 2020-12-28 20:37
 **/
@Service
@Slf4j
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public int save(Order order) {
        return orderMapper.insertSelective(order);
    }

    @Override
    public List<Order> listAll() {
        return orderMapper.selectAll();
    }
}
